<?php

namespace App\Http\Controllers;

use App\Models\Plate\Version;

class PlateController extends Controller{

    public function version()
    {
        $version = Version::where('status', 1)->orderBy('id', 'desc')->first();
        $data = [];
        if ($version) {
            $data['versionName'] = $version->version1 . '.' . $version->version2 . '.' .$version->version3;
            $data['versionCode'] = $version->vcode;
            $data['url'] = 'https://qn.keji110.com/' . $version->download_url;
            $data['updated_at'] = strtotime($version->updated_at);
        }
        return response()->json($data);
    }
}